package org.boot.easyapi.enums.db;

import lombok.Getter;

@Getter
public enum DbEnum {

    MYSQL("mysql"), // mysql
    POSTGRESQL("postgresql"); // kingbase、postgresql

    private String key;

    DbEnum(String key) {
        this.key = key;
    }

    public static DbEnum getByKey(String key) {
        for (DbEnum value : DbEnum.values()) {
            if (value.key.equals(key)) {
                return value;
            }
        }
        return null;
    }
}
